package o2o.dao.PO.user;

import com.jinyou.utils.common.ValidateUtil;

//用户的收货地址
public class UserAddress {
    private Long id; // 标识
    private String username; // 用户账号
    private String buyer; // 收货人姓名
    private String sex = "boy"; // boy   girl
    private String postalCode;      // 邮政编码
    private String telephone; // 收货人联系方式
    private String address; // 收货人具体地址
    private String address2; //收货详细地址
    private String address3; //房间号
    private Double lng = 0d; //经度
    private Double lat = 0d; //纬度
    private String geocode; // GeoHash码
    private Long areaPoint;//areaPoint
    private String province; // 省份
    private String city; // 市
    private String county; // 区县
    private int isDefault; // 是否是默认地址(0
    private int delFlag; // 是否已删除(0未删除,1已删除)
    private String createUser; // 创建者
    private long createTime; // 创建日期
    private String updateUser; // 最后更新着
    private String updateTime; //最后更新时间

    private String extra1;//备用字段1
    private String extra2;//备用字段2
    private String extra3;//备用字段3

    private Long agentId;//学校ID（代理ID）

    private Long shopId;    // 店铺id

    private Long agentAddressId;    // 楼号id

    public Long getAgentAddressId() {
        return agentAddressId;
    }

    public UserAddress setAgentAddressId(Long agentAddressId) {
        this.agentAddressId = agentAddressId;
        return this;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    public String getSex() {
        return sex;
    }

    public UserAddress setSex(String sex) {
        this.sex = sex;
        return this;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getBuyer() {
        return buyer;
    }

    public void setBuyer(String buyer) {
        this.buyer = buyer;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Double getLng() {
        return lng;
    }

    public void setLng(Double lng) {
        this.lng = lng;
    }

    public Double getLat() {
        return lat;
    }

    public void setLat(Double lat) {
        this.lat = lat;
    }

    public String getGeocode() {
        return geocode;
    }

    public void setGeocode(String geocode) {
        this.geocode = geocode;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public int getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(int isDefault) {
        this.isDefault = isDefault;
    }

    public int getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(int delFlag) {
        this.delFlag = delFlag;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getAddress2() {
        if (ValidateUtil.isNull(address2)) {
            return "";
        }
        if ("null".equalsIgnoreCase(address2)) {
            return "";
        }
        return address2;
    }

    public void setAddress2(String address2) {
        this.address2 = address2;
    }

    public Long getAreaPoint() {
        return areaPoint;
    }

    public void setAreaPoint(Long areaPoint) {
        this.areaPoint = areaPoint;
    }

    public Long getAgentId() {
        return agentId;
    }

    public void setAgentId(Long agentId) {
        this.agentId = agentId;
    }

    public String getAddress3() {
        return address3;
    }

    public void setAddress3(String address3) {
        this.address3 = address3;
    }


    public String getExtra1() {
        return extra1;
    }

    public void setExtra1(String extra1) {
        this.extra1 = extra1;
    }

    public String getExtra2() {
        return extra2;
    }

    public void setExtra2(String extra2) {
        this.extra2 = extra2;
    }

    public String getExtra3() {
        return extra3;
    }

    public void setExtra3(String extra3) {
        this.extra3 = extra3;
    }
}
